macro | description | example |
---|---|---|
PRI xMAX | printf specifier for intmax_t | PRIiMAX is the equivalent of i (in "%i" ) for intmax_t values |
PRI xN | printf specifier for int N_t | PRId16 is the equivalent of d (in "%d" ) for int16_t values |
PRI xLEAST N | printf specifier for int_least N_t | PRIuLEAST32 is the equivalent of u (in "%u" ) for uint32_t values |
PRI xFAST N | printf specifier for int_fast N_t | PRIxFAST8 is the equivalent of x (in "%x" ) for uint8_t values |
PRI xPTR | printf specifier for intptr_t | PRIuPTR is the equivalent of u (in "%u" ) for uintptr_t values |
SCN xMAX | scanf specifier for intmax_t | SCNiMAX is the equivalent of i (in "%i" ) for intmax_t values |
SCN xN | scanf specifier for int N_t | SCNd16 is the equivalent of d (in "%d" ) for int16_t values |
SCN xLEAST N | scanf specifier for int_least N_t | SCNuLEAST32 is the equivalent of u (in "%u" ) for uint32_t values |
SCN xFAST N | scanf specifier for int_fast N_t | SCNxFAST8 is the equivalent of x (in "%x" ) for uint8_t values |
SCN xPTR | scanf specifier for intptr_t | SCNuPTR is the equivalent of u (in "%u" ) for uintptr_t values |
d
, i
, o
,u
or x
(for the printf specifiers this can also be an uppercase X
).*i
and d
, and unsigned for o
, u
, x
and X
.function | description |
---|---|
imaxabs | equivalent to abs for intmax_t:intmax_t imaxabs (intmax_t n); |
imaxdiv | equivalent to div for intmax_t:imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom); |
strtoimax | equivalent to strtol for intmax_t:intmax_t strtoimax (const char* str, char** endptr, int base); |
strtoumax | equivalent to strtoul for uintmax_t:uintmax_t strtoumax (const char* str, char** endptr, int base); |
wcstoimax | equivalent to wcstol for intmax_t:intmax_t wcstoimax (const wchar_t* wcs, wchar_t** endptr, int base); |
wcstoumax | equivalent to wcstoul for uintmax_t:uintmax_t wcstoumax (const wchar_t* wcs, wchar_t** endptr, int base); |
Type | description |
---|---|
imaxdiv_t | Type returned by imaxdiv, which is the div_t equivalent for intmax_t. |
|
|
Please, enter a number: 10 Thanks for entering 10. Please, enter another number: 20 10 by 20 is 200 |